
<?php
session_start();
require_once '../models/Product.php';
require_once '../models/_check_admin.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>List series</title>
<?php include '../admin/_meta.php';?>
</head>
<body>

	<div id="firstLine">
		<div id="top-bar">
		<?php include '_top_bar_admin.php';?>
		</div>
	</div>
	<div id="container">
		<div id="header">
			<?php include '_menu_admin.php';?>
		</div>
		<div id="center">
			<div id="table-user">
			<div>
			<form>
				<table id="table-admin">
					<tr>
						<td colspan="2"><b>Add Series</b></td>
					</tr>
					<tr>
						<td><span>Brand Name</span></td>
						<td><select id="brandID" name="brandID" onchange="printModelDrop();">
						<option value="null">All Brands:</option>
						<?php Product::printBrandDrop('');?></select></td>
					</tr>
					<tr>
						<td><span>Model Name</span></td>
						<td>
							<div class="drop-container" id="model-drop-container">
								<select name="modelID" id="modelID" class="dropbox">
									<option value="null">All Models:</option>
								</select></td>
							</div>
					</tr>
					<tr>
						<td><span>Series Name</span></td>
						<td><input type="text" name="seriesName" id="seriesName"></td>
					</tr>
					<tr>
						<td><input type="button" name="btn_submit" value="Add" class="btn_submit" onclick="addSeries();"></td>
							<td><a href="list_product.php"><input type="button" name="reset" value="Cannel" class="btn_submit"></a></td>
					</tr>
				</table>
			</form>
			</div>	
				<div class="clear-both"></div>
				<div class="view-content">
					<div class="loading-container">
						<span class="loading-image" id="submit-loading"></span>
					</div>
					<div class="ajax-content" id="series-div">
						<?php Product::printSeriesTable('');?>
					</div><br/>				
				</div>	
			</div>
			</div>
		</div>
	</div>
	</div>
	<div>
		<?php include '_footer_admin.php';?>
	</div>

</body>
</html>